Update the creation and update ips.

@return void
336933
protected function updateIps()
    {
        $ip = smart_get_client_ip();

        if (!$this->isDirty('updated_ip')) {
            $this->updated_ip = $ip;
        }

        if (!$this->exists && !$this->isDirty('created_ip')) {
            $this->created_ip = $ip;
        }
    }
1018614
public function updateGeoIp()
    {
        $updater = new GeoIpUpdater();

        $success = $updater->updateGeoIpFiles($this->config->get('geoip_database_path'));

        $this->messageRepository->addMessage($updater->getMessages());

        return $success;
    }
1211919
protected function update() {
        
        if(Auth::isAdmin()){
            
            $this->module->setSetting('MAJ_SHOW_CERT', Filter::post('MAJ_SHOW_CERT'));
            $this->module->setSetting('MAJ_SHOW_NO_WATERMARK', Filter::post('MAJ_SHOW_NO_WATERMARK'));
            
            if($MAJ_WM_DEFAULT = Filter::post('MAJ_WM_DEFAULT')) {
                $this->module->setSetting('MAJ_WM_DEFAULT', $MAJ_WM_DEFAULT);
            }
            
            if($MAJ_WM_FONT_MAXSIZE = Filter::postInteger('MAJ_WM_FONT_MAXSIZE')) {
                $this->module->setSetting('MAJ_WM_FONT_MAXSIZE', $MAJ_WM_FONT_MAXSIZE);
            }
            
            // Only accept valid color for MAJ_WM_FONT_COLOR
            $MAJ_WM_FONT_COLOR = Filter::post('MAJ_WM_FONT_COLOR', '#([a-fA-F0-9]{3}){1,2}');            
            if($MAJ_WM_FONT_COLOR) {
                $this->module->setSetting('MAJ_WM_FONT_COLOR', $MAJ_WM_FONT_COLOR);
            }
            
            // Only accept valid folders for MAJ_CERT_ROOTDIR
            $MAJ_CERT_ROOTDIR = preg_replace('/[\/\\\\]+/', '/', Filter::post('MAJ_CERT_ROOTDIR') . '/');
            if (substr($MAJ_CERT_ROOTDIR, 0, 1) === '/') {
                $MAJ_CERT_ROOTDIR = substr($MAJ_CERT_ROOTDIR, 1);
            }
            
            if ($MAJ_CERT_ROOTDIR) {
                if (is_dir(WT_DATA_DIR . $MAJ_CERT_ROOTDIR)) {
                    $this->module->setSetting('MAJ_CERT_ROOTDIR', $MAJ_CERT_ROOTDIR);
                } elseif (File::mkdir(WT_DATA_DIR . $MAJ_CERT_ROOTDIR)) {
                    $this->module->setSetting('MAJ_CERT_ROOTDIR', $MAJ_CERT_ROOTDIR);
                    FlashMessages::addMessage(I18N::translate('The folder %s has been created.', Html::filename(WT_DATA_DIR . $MAJ_CERT_ROOTDIR)), 'info');
                } else {
                    FlashMessages::addMessage(I18N::translate('The folder %s does not exist, and it could not be created.', Html::filename(WT_DATA_DIR . $MAJ_CERT_ROOTDIR)), 'danger');
                }
            }
            
            FlashMessages::addMessage(I18N::translate('The preferences for the module “%s” have been updated.', $this->module->getTitle()), 'success');
            
            return;
        }
    }
607857
protected function updateSettings()
    {
        $this->controlAccess('module_edit');
        $this->controlAccess('module_xss_edit');

        $this->module->setSettings('xss', $this->getSubmitted());
        $this->redirect('', $this->text('Settings have been updated'), 'success');
    }
1354570
protected function execute()
    {
        $ips = $this->user->posts()->whereNotNull('ip_address')->lists('ip_address');

        $this->report['locations'] = "Ip's used: ".count($ips);
        $this->report['related'] = [];

        User::whereHas('posts', function ($q) use ($ips) {
            $q->whereIn('ip_address', $ips);
        })
            ->where('id', '!=', $this->user->id)
            ->chunk(10, function ($users) {
                foreach ($users as $user) {
                    $this->report['related'][] = $user->toJson();
                }
            });
    }
139629
public function updateOwners()
    {
        foreach ($this->attributes as $attr) {
            Mediafile::removeOwner($this->owner->primaryKey, $this->name, $attr);

            if ($mediafile = $this->loadModel($this->owner->$attr)) {
                $mediafile->addOwner($this->owner->primaryKey, $this->name, $attr);
            }
        }
    }
975955
public function up()
    {
        Schema::table('firewalls', function (Blueprint $table) {
            Schema::getConnection()
                ->getDoctrineSchemaManager()
                ->getDatabasePlatform()
                ->registerDoctrineTypeMapping('enum', 'string');

            $table->string('ip', 50)->change();
        });
    }
167222
public function update()
    {
        try {
            Option::set(self::LAST_RUN_TIME_OPTION_NAME, Date::factory('today')->getTimestamp());

            $locUrl = Option::get(self::LOC_URL_OPTION_NAME);
            if (!empty($locUrl)) {
                $this->downloadFile('loc', $locUrl);
            }

            $ispUrl = Option::get(self::ISP_URL_OPTION_NAME);
            if (!empty($ispUrl)) {
                $this->downloadFile('isp', $ispUrl);
            }

            $orgUrl = Option::get(self::ORG_URL_OPTION_NAME);
            if (!empty($orgUrl)) {
                $this->downloadFile('org', $orgUrl);
            }
        } catch (Exception $ex) {
            // message will already be prefixed w/ 'GeoIPAutoUpdater: '
            StaticContainer::get(LoggerInterface::class)->error('Auto-update failed: {exception}', [
                'exception' => $ex,
                'ignoreInScreenWriter' => true,
            ]);
            $this->performRedundantDbChecks();
            throw $ex;
        }

        $this->performRedundantDbChecks();
    }
1294854
public function update()
    {
        if (!file_exists(static::FILENAME)) {
            return;
        }

        $contents = Yaml::parse(file_get_contents(static::FILENAME)) ?: [];

        if (!isset($contents['paths'])) {
            return;
        }

        $originalPaths = $contents['paths'];
        $contents['paths'] = $newPaths = $this->updatePaths(new MutableBag($originalPaths))->toArray();

        if ($originalPaths === $newPaths) {
            return;
        }

        $this->save($contents);
    }
417854
protected function updateTimestamps() {
        $time = $this->freshTimestamp();
        if ($this->isEmpty(static::UPDATED_AT)
            && $this->hasColumn(static::UPDATED_AT)) {
            $this->setUpdatedAt($time);
        }

        if ($this->isNewRecord
            && $this->isEmpty(static::CREATED_AT)
            && $this->hasColumn(static::CREATED_AT)) {
            $this->setCreatedAt($time);
        }
    }
157370
protected function updateTimestamps()
    {
        $time = $this->freshTimestamp();

        if (! $this->isDirty($this->updatedAtColumn)) {
            $this->setUpdatedAt($time);
        }

        if (! $this->exists && ! $this->isDirty($this->createdAtColumn)) {
            $this->setCreatedAt($time);
        }
    }
344661
public function up()
    {
        Schema::create('ip_limit', function (Blueprint $table) {
            $table->increments('id');
            $table->ipAddress('ip');
            $table->boolean('is_expire')->default(false);
            $table->unsignedInteger('count')->default(0);
            $table->dateTime('expire_date');
            $table->timestamps();
        });
    }
548868
public function change()
	{
		$this->table('database_logs')
			->changeColumn('ip', 'string', [
				'default' => null,
				'limit' => 100,
				'null' => true,
			])
			->changeColumn('hostname', 'string', [
				'default' => null,
				'limit' => 100,
				'null' => true,
			])
			->changeColumn('created', 'datetime', [
				'default' => null,
				'null' => false,
			])->update();
	}
1018687
protected function update()
    {
        DbTable::update($this->db, $this->_tableName, $this->_cols, $this->id);
    }
585603
public void update()
	{
		IProcess process = fConsole.getProcess();
		if (process != null)
		{
			setEnabled(process.canTerminate());
		}
	}
1309578
protected function updateProduct()
    {
        $this->controlAccess('product_edit');

        if ($this->product->update($this->data_product['product_id'], $this->getSubmitted())) {
            $this->redirect('admin/content/product', $this->text('Product has been updated'), 'success');
        }

        $this->redirect('', $this->text('Product has not been updated'), 'warning');
    }
1045552
def update(cls):
        
        ifaddrs = getifaddrs()
        # Create new interfaces
        for ifname in ifaddrs.keys():
            if filter(ifname.startswith, cls.NAME_FILTER):
                cls.objects.get_or_create(name=ifname)

        # Delete no longer existing ones
        cls.objects.exclude(name__in=ifaddrs.keys()).delete()